(world instanceof Level _lvl${cbi} && _lvl${cbi}.getServer() != null && _lvl${cbi}.getServer().getAdvancements()
    .getAdvancement(new ResourceLocation("${generator.map(field$achievement, "achievements")}" )).equals(advancement))